home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
logs
/
logbook
/
dxccupdt.prg
< prev
next >
Wrap
Text File
|
1990-05-04
|
6KB
|
198 lines
*:*********************************************************************
*:
*: Program: DXCCUPDT.PRG
*:
*: System: PC-HAM Logbook
*: Author: Joe Kasser G3ZCZ
*: Copyright (c) 1990, Joe Kasser
*: Last modified: 04/27/90 13:17
*:
*: Called by: DXCC.PRG
*:
*: Uses: &LOGBOOK.DBF
*: : &DXCC
*:
*: Indexes: &LOGNDX
*:
*: Documented 05/04/90 at 13:50 SNAP! version 3.12f
*:*********************************************************************
*DXCCUPDT AUTOMATICALLY UPDATES DXCC RECORDS FROM LOG DATABASE VER 860515
* PATCHED 870717, 871209, 890602
* DOES NOT RECOGNISE SEPARATE BANDS OR MODES
* (c) COPYRIGHT JOE KASSER G3ZCZ 1986
SELECT 1
USE &logbook INDEX &logndx
SELECT 2
USE &dxcc
DO WHILE .not. EOF()
CLEAR
? px
IF dstate = 'Q'
?? ' ',dcall,' ALREADY CONFIRMED IN DXCC RECORD'
ELSE
* NOT WORKED YET, SO TRY LOG FOR UPDATE'
STORE TRIM(px) TO prefix
SELECT 1
FIND &prefix
IF (EOF() .or. BOF())
* NO FIND, TRY ALTERNATE PREFIX'
SELECT 2
IF SUBSTR(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO TO NEXT PREFIX'
ELSE
STORE TRIM(px1) TO prefix
? px1
SELECT 1
FIND &prefix
IF (EOF() .or. BOF())
*NO FIND AGAIN, GO TO NEXT PREFIX '
ELSE
* FOUND SOMETHING FOR PX1 '
STORE .t. TO qslflag
DO WHILE .not. EOF() .and. CALL = prefix .and. qslflag
? CALL,DATE,TIME,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL'
ENDIF
SKIP
ENDDO
SKIP -1
STORE CALL TO CALL
STORE DATE TO DATE
STORE TIME TO TIME
STORE mode TO mode
STORE band TO band
SELECT 2
REPLACE dcall WITH CALL
REPLACE ddate WITH DATE
REPLACE dtime WITH TIME
REPLACE dmode WITH mode
REPLACE dband WITH band
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
ENDIF
ENDIF
ENDIF
ELSE
*FOUND SOMETHING FOR PX, see if its qsled'
STORE .t. TO qslflag
DO WHILE .not. EOF() .and. CALL = prefix .and. qslflag
? CALL,DATE,TIME,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL'
ENDIF
SKIP
ENDDO
SKIP -1
IF qslflag
*its not qsled, only worked '
* TRY ALTERNATE PREFIX
SELECT 2
IF SUBSTR(px1,1,1) = ' '
* NO ALTERNATE PREFIX, GO BACK TO FIRST PREFIX'
STORE TRIM(px) TO prefix
SELECT 1
GOTO TOP
* PICK FIRST ONE
FIND &prefix
STORE CALL TO CALL
STORE DATE TO DATE
STORE TIME TO TIME
STORE mode TO mode
STORE band TO band
SELECT 2
REPLACE dcall WITH CALL
REPLACE ddate WITH DATE
REPLACE dtime WITH TIME
REPLACE dmode WITH mode
REPLACE dband WITH band
REPLACE dstate WITH 'W'
ELSE
STORE TRIM(px1) TO prefix
*
? px1
SELECT 1
FIND &prefix
IF (EOF() .or. BOF())
*NO FIND AGAIN, GO BACK TO FIRST PREFIX '
SELECT 2
STORE TRIM(px) TO prefix
SELECT 1
FIND &prefix
STORE CALL TO CALL
STORE DATE TO DATE
STORE TIME TO TIME
STORE mode TO mode
STORE band TO band
SELECT 2
REPLACE dcall WITH CALL
REPLACE ddate WITH DATE
REPLACE dtime WITH TIME
REPLACE dmode WITH mode
REPLACE dband WITH band
REPLACE dstate WITH 'W'
ELSE
* FOUND SOMETHING FOR PX1 '
STORE .t. TO qslflag
DO WHILE .not. EOF() .and. CALL = prefix .and. qslflag
? CALL,DATE,TIME,band,qslsent,qslrx
IF qslrx = 'R'
STORE .F. TO qslflag
*FOUND A QSL
ENDIF
SKIP
ENDDO
SKIP -1
STORE CALL TO CALL
STORE DATE TO DATE
STORE TIME TO TIME
STORE mode TO mode
STORE band TO band
SELECT 2
IF qslflag
REPLACE dstate WITH 'W'
ELSE
REPLACE dstate WITH 'Q'
ENDIF
ENDIF
SELECT 2
REPLACE dcall WITH CALL
REPLACE ddate WITH DATE
REPLACE dtime WITH TIME
REPLACE dmode WITH mode
REPLACE dband WITH band
ENDIF
ELSE
* PX IS QSLED, UPDATE DATA
STORE CALL TO CALL
STORE DATE TO DATE
STORE TIME TO TIME
STORE mode TO mode
STORE band TO band
SELECT 2
REPLACE dstate WITH 'Q'
REPLACE dcall WITH CALL
REPLACE ddate WITH DATE
REPLACE dtime WITH TIME
REPLACE dmode WITH mode
REPLACE dband WITH band
ENDIF
ENDIF
ENDIF
SELECT 2
SKIP
ENDDO
SELECT 2
USE
SELECT 1
USE
RELEASE prefix,qslflag, CALL, DATE, TIME, mode, band
RETURN
*: EOF: DXCCUPDT.PRG